<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="com.ereport.entity.DailyActivity"%>
<%@page import="java.util.List"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="com.ereport.entity.Executives"%>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>KK Circuits &amp; Equipments E-Reporting</title>

<link href="<%=application.getContextPath() %>/css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-1.6.min.js"></script>	
<script language="javascript" src="<%=application.getContextPath() %>/js/calendar_eu.js"></script>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<link rel="stylesheet" href="<%=application.getContextPath() %>/css/jquery-ui-1.8.17.custom.css"/>

<style>
	#editor{
	width:95%;
	}
	#contactDet{
	width:95%;
	}
	#nextsteppopup {
	position:absolute;
  z-index:200; /* aaaalways on top*/
  padding: 3px;
 
  width: 250px;
  color: white;
	}
	.ui-dialog .ui-state-error { padding: .3em; }
	.ui-corner-all{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #666666;
	text-decoration: none;
	}
	.ui-corner-all:hover{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #666666;
	text-decoration: none;
	}
	.logout{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 13px;
	height: 15px;
	width: 50px;
	font-weight: normal;
	color: red;
	text-decoration: none;
	}
	#bulletinDialog title{
	font-family:Arial, Helvetica, sans-serif;
	font-size:14px;
	font-weight:bold;
	}
	</style>
<script  type="text/javascript">
$(document).ready(function(){
$('.popup').live('click',function(){
var id=this.id;
var $dialog = $('#bulletinDialog'+id).dialog({
                autoOpen: false,
                modal: true,
                width: 285,
                height: 230,
			 });
 			var text=$("#editor"+id).val();
			$("."+id).val(text);
			$dialog.dialog('open');
});
});
</script>
<script  type="text/javascript">
$(document).ready(function(){
$('.popup3').live('click',function(){
var id=this.id;
var $dialog = $('#contdetDailog'+id).dialog({
                autoOpen: false,
                modal: true,
                width: 250,
                height: 330,
            });
			var text=$("#mbl"+id).val();
			$(".mbl"+id).val(text);
			var text=$("#email"+id).val();
			$(".email"+id).val(text);
			var text=$("#fax"+id).val();
			$(".fax"+id).val(text);
			var text=$("#landph"+id).val();
			$(".landph"+id).val(text);
			
            $dialog.dialog('open');
});
});

		
    </script>
   <script>

	$(function() {
		$( "#dailyDate" ).datepicker({ dateFormat: "dd-mm-yy" });
	});
	</script>
</head>

<body>
<form action="<%=application.getContextPath()%>/dailyActInAdmin/getActReport.do" method="post" name="myform"  ><table width="927" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="116" align="left" valign="top" background="<%=application.getContextPath() %>/images/top-bg.jpg" style="background-repeat:repeat-x; background-position:left top">
    <%@ include file="../common/exe-header.jsp" %>
    </td>
  </tr>
  
  <tr>
    <td height="600" align="left" valign="top"><table width="927" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="20">&nbsp;</td>
        <td width="643" align="right">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left" valign="top">&nbsp;<a href="<%=application.getContextPath() %>/user/open.do"><img src="<%=application.getContextPath() %>/images/home1.jpg" width="20" height="20" border="0" /></a></td>
              <td width="8%" align="center"><a href="<%=application.getContextPath() %>/user/logout.do" style="font-family: sans-serif;">&nbsp;&nbsp;Logout</a></td>
            </tr>
          </table>
         </td>
        <td width="20">&nbsp;</td>
      </tr>
       <tr>
        <td>&nbsp;</td>
        <td align="center"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td width="20">&nbsp;</td>
        <td align="center" valign="top" class="heading">Activity Report </td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center">
       </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td >&nbsp;</td>
        <td align="center">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        	<tr>
        		
                <td height="23" align="left" valign="middle" class="hed-blc">&nbsp;Executive Name:
                 <select name="exeName" id="exeName" class="textfield required"  >
                 	 <option value="">Please Select</option>
                 	 <%
                 	 List<Executives> exlist=(List<Executives>)request.getAttribute("exlist");
                 	 for(int i=0;i<exlist.size();i++){
                 		 String exeName="";
                 		
                			exeName=request.getParameter("exeName");
                			if(exlist.get(i).getExeName().equals(exeName)){
                				%>
                				<option value="<%= exlist.get(i).getId()%>" selected="selected"><%= exlist.get(i).getExeName()%></option>
                			<%
                			}else {
                		              	 
                 	 %>
                 	 <option value="<%= exlist.get(i).getId()%>"><%= exlist.get(i).getExeName()%></option>
                 	 <%
                 	 } 
                 	 }
                 	 %>
                 </select>
                </td>
              
        		<td class="hed-blc" width="18%" align="center">Daily Call Report By Date</td>
        		<td align="left" width="13%"> 
        		<%
        		String edate="";
        		if(request.getParameter("edate")!=null){
        			edate=request.getParameter("edate");
        		}
        		%>
        			<input name="dailyDate" id="dailyDate" class="textfield" style="width: 100px" type="text" value="<%=edate %>" />
        		</td>
        		<td>
        			<input type="submit" name="go" value="GO" class="button-black" style="width: 37px; height: 25px; font-size: 11px; "/>
        		</td>
        	</tr>
        </table>
       </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center"></td>
        <td>&nbsp;</td>
      </tr>
       <tr>
        <td>&nbsp;</td>
        <td align="center"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center" valign="top">
        <%
        List<DailyActivity> dalist=(List<DailyActivity>)session.getAttribute("dalist");
        System.out.println("dalist in jsp "+dalist);
        if(dalist!=null){
        	if(dalist.size()!=0){
        		System.out.println("dalist size is "+dalist.size());
        %>
        <div id="dailyActivity">
        <table width="870" border="0" cellspacing="0" cellpadding="0">
       <tr>
            <td align="left" valign="top">
           <table width="895" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td>
                <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#787878" class="tablebox" id="infoTable">
                  <tr style="background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x; background-position:left top">
                    
                    <td width="2%" height="30" align="center" valign="middle" class="hed"><strong>Sr. No </strong></td>
                    <td width="18%" align="center" valign="middle" class="hed">Company</td>
                    <td width="10%" align="center" valign="middle" class="hed">Division/Group</td>
                    <td width="10%" align="center" valign="middle" class="hed"><strong>Contact Person </strong></td>
                    <td width="4%" align="center" valign="middle" class="hed">Contact Details</td>
                    <td width="20%" align="center" valign="middle" class="hed"><strong>Objective </strong></td>
                    <td width="20%" align="center" valign="middle" class="hed">Cutomer Feed Back</td>
                    <td width="9%" align="center" valign="middle" class="hed"><strong>Action To Be Taken </strong></td>
                    <td width="6%" align="center" valign="middle" class="hed"><strong>Kms</strong></td>
                    <!-- <td width="4%" align="center" valign="middle" class="hed">&nbsp;</td>  -->
                    
                  </tr>
                  <%
                  for(int i=0;i<dalist.size();i++){
                  %>
                  <tr>
                    
                  	<td align="center" bgcolor="#cccccc"><%=i+1%></td>
                    <td bgcolor="#cccccc">
                    	<input name="org1" class="tdinput" id="org1" type="text" value="<%=dalist.get(i).getOrganisation()%>" readonly="readonly" />
                    </td>
                    <td bgcolor="#cccccc">
                    	<input name="disig1" class="tdinput" id="disig" type="text" size="8" value="<%= dalist.get(i).getDivision()%>" readonly="readonly"/>
                    </td>
                    <td bgcolor="#cccccc">
                    	<input name="contper1" class="tdinput" id="contper1" type="text" size="8" value="<%= dalist.get(i).getContPerson()%>" readonly="readonly"/>
                    </td>
                    <td  align="center" bgcolor="#cccccc">
                    <img src="<%=application.getContextPath() %>/images/arrow-li-2.gif" width="26" height="22" border="0" align="absmiddle" id="contpop<%=i+1 %>" class="popup3"/>
                   
                     <div id="contdetDailogcontpop<%=i+1 %>" style="display: none;" title="Contact Details">
                     	<br />
                  		<label class="content">Mobile</label><br />
						<input type="text" name="mobile" class="textfield" style="width: 220px" id="mobilecontpop<%=i+1 %>" value="<%= dalist.get(i).getContPerMbl()%>" readonly="readonly"/>
						<br /><br /><label class="content">Email</label><br />
						<input type="text" name="email" class="textfield" style="width: 220px" id="emailcontpop<%=i+1 %>" value="<%= dalist.get(i).getContPerEmail()%>" readonly="readonly"/>
						<br /><br /><label class="content">Fax</label><br />
						<input type="text" name="fax" class="textfield" style="width: 220px" id="faxcontpop<%=i+1 %>" value="<%= dalist.get(i).getContPerFax()%>" readonly="readonly"/>
        				<br /><br /><label class="content">Land Phone</label><br />
						<input type="text" name="landph" class="textfield" style="width: 220px" id="landphcontpop<%=i+1 %>" value="<%= dalist.get(i).getContPerLand()%>" readonly="readonly"/>
        				<br />
				
                   
                     </div>  
                      </td>          
                   
                    <td width="75" bgcolor="#cccccc">
                    	<input type="text" class="tdinput" name="vistObj1" id="visitObjpop1" size="8" title="<%=dalist.get(i).getVistObj()%>" value="<%=dalist.get(i).getVistObj()%>" readonly="readonly"/>
                    </td>
                    <td width="75" bgcolor="#cccccc">
                    	<input type="text" class="tdinput" name="vistOC1" id="visitOCpop1" size="8" title="<%= dalist.get(i).getVistOc()%>" value="<%= dalist.get(i).getVistOc()%>" readonly="readonly"/>
                    </td>
                    <td align="center" bgcolor="#cccccc">
                    	<img src="<%=application.getContextPath() %>/images/arrow-li-2.gif" width="26" height="22" border="0" align="absmiddle" id="pop<%=i+1 %>" class="popup"/>
                      <div id="bulletinDialogpop<%=i+1 %>" style="display: none;" title="Nextstep">
                    	<textarea id="editorpop<%=i+1 %>"  name="Message" rows="10" style="width: 250px;" ><%= dalist.get(i).getNextstep()%></textarea>
                      </div>
                     	
                    </td>
                    <td  bgcolor="#cccccc">
                    	<input name="kms1" class="tdinput" id="kms1" type="text" size="3"  class="form-ui-exsmall" value="<%= dalist.get(i).getKms()%>" readonly="readonly"/>
                    </td>
                   <%--  <td align="center" bgcolor="#cccccc">
                    
                    	<a href="javascript:void()" onclick="javascript:window.open('<%=application.getContextPath() %>/opportunity/enqReport.do?org=<%=dalist.get(i).getOrganisation()%>&edate=<%=dalist.get(i).getEdate()%>&exe=<%=dalist.get(i).getExeId().getId()%>')">
					<img src="<%=application.getContextPath() %>/images/enquiry-2.jpg" align="middle" id="enq1" border="0"/> </a></td> --%> 
				</tr>
				<%
                  }
				%>
		 </table>  
	 </td>
              </tr>
              <tr>
                <td height="10" align="left" valign="top"></td>
              </tr>
              <tr>
                <td align="left" valign="top"></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td></td>
              </tr>
              <tr>
                <td height="5"></td>
              </tr>
              <tr>
                <td></td>
              </tr>
            </table>                       </td>
  </tr>
         
          <tr>
            <td align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td align="right" valign="top">&nbsp;</td>
          </tr>
          
          <tr>
            <td align="left" valign="top">&nbsp;</td>
          </tr>
          <tr>
            <td align="left" valign="top">&nbsp;</td>
          </tr>
        </table>
        </div>
        <%
        
        }else {
        %>
        <p class="box-border1 hed-blc" style="font-size: 13px" > No Records Found</p>
		<%
        }
        	session.setAttribute("dalist",null);
        }
		%>
        </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      
    </table></td>
  </tr>
  <tr>
    <td height="40" align="left" valign="top" bgcolor="#0B0B0B">&nbsp;</td>
  </tr>
</table></form>
</body>
</html>

